A. Field of the Invention
Systems, apparatus, and methods consistent with the present invention relate generally to data communications and, more particularly, to systems, apparatus, and methods for increasing resiliency of data communications.
B. Description of Related Art
Transmitting data reliably in a network requires transmitting and receiving systems to process data in the same way. For example, if the transmitting system scrambles data, the receiving system must descramble the data in the same manner in which it was scrambled. Standards often define how transmitting and receiving systems should process data. The Synchronous Optical NETwork (SONET) standard is one such standard.
SONET was developed for transporting data over optical links. In SONET, data is transmitted in a SONET payload envelope (SPE). SONET is sometimes used to transport other protocols. For example, standards have been developed for transporting Point-to-Point Protocol (PPP) data over SONET. One approach to PPP over SONET is described in a paper entitled “PPP Over SONET (SDH) at Rates From STS-1 (AU-3) TO STS-192c (AU-4-64c/STM-64),” S. Merchant (prepared for the PPP Extensions Working Group, 1998) (“Merchant”), the contents of which are hereby incorporated by reference.
Merchant describes encapsulating data in a frame format similar to the frame format used in the High-level Data Link Control (HDLC) protocol. The HDLC-like frame is then placed in the SPE for transport over SONET. The data is delineated with a 0x7e flag at the beginning of the data and the same flag, 0x7e, at the end of the data. Therefore, 0x7e followed by a data value indicates the start of an HDLC frame, and a data value followed by 0x7e indicates the end of an HDLC frame.
A problem arises, however, if a data byte between the 0x7e flags happens to also equal 0x7e. To solve this problem, the data values are analyzed. Each single byte 0x7e data value is replaced, or “escaped,” by the two-byte value 0x7d 0x5e. This operation is referred to as byte expansion because one byte is replaced by two bytes.
On the receiving end, the receiving system passes 0x7e values until a non-0x7e value is received, meaning a data stream has started. When the receiving system encounters the two-byte 0x7d 0x5e sequence in the data, it converts the sequence back to 0x7e. This solves the problem of flag values appearing in the data.
But this raises another problem. How does the receiving end know when 0x7d is data, and when it is the first byte of the sequence 0x7d 0x5e? To solve this problem, the transmitting system also replaces each single byte 0x7d data value by the two-byte sequence 0x7d 0x5d. The receiving system, in addition to converting 0x7d 0x5e in the data back to 0x7e, also converts 0x7d 0x5d back to 0x7d.
Byte expansion solves the problem of flag bytes appearing in the data, but unfortunately raises another. An attacker might use this property to overload a link by sending a long string of 0x7d and/or 0x7e data values. Since these single-byte values are expanded to two bytes, the number of bytes is effectively doubled. This reduces bandwidth on the link by half. Thus, an attacker can reduce the bandwidth by sending through a long string of 0x7d and/or 0x7e data values.
Merchant proposes solving the byte expansion problem by scrambling the data using an HDLC scrambler. Scrambling the data before the data is analyzed for flag values virtually eliminates the possibility of an attacker using byte expansion to halve the bandwidth. Thus, scrambling the values thwarts an attacker sending through all 0x7d's and 0x7e's.
One problem with using an HDLC scrambler, however, is that the receiving end HDLC descrambler might fall out of synchronization with the transmitting end HDLC scrambler. On the transmitting end, the HDLC scrambler only advances when packet data is coming through. Thus, during idle time, the HDLC scrambler is not advancing its state and the transmitting system is sending 0x7e inter-frame time fill bytes in each SPE.
A problem arises, however, when there is an error in one or more of the 0x7e inter-frame time fill bytes. If there is an error in one of the inter-frame time fill bytes, the receiving system interprets the byte as a data value because it no longer has a value of 0x7e. On the receiving end the HDLC descrambler is active only when packet data is being received (e.g., bytes other than 0x7e inter-frame time fill bytes are being received). Thus, when there is an error in one of the inter-frame time fill bytes, the byte appears to not be an inter-frame time fill 0x7e byte, which causes the HDLC descrambler to advance during idle time, when it should not. This causes the receiving end HDLC descrambler to no longer be synchronized with the transmitting end HDLC scrambler because it has advanced based on an error, when it should not advance.
When the next data packet is received at the HDLC descrambler, the packet will not be descrambled correctly because the HDLC descrambler is not in the correct state. Consequently, the packet will be thrown out.
Therefore, there exists a need for systems, apparatus, and methods that maintain a link between two systems even when there are bit errors during slow transmission periods.